import { expect } from 'chai';
import isAdult from '../src/isAdult';

describe('isAdult unit test', function() {
    it('should return false if missing arguments', function() {
        expect(isAdult()).to.equal(false);
    });

    it('should return true for valid id', function() {
        expect(isAdult('12345619800101003X')).to.equal(true);
    });

    it('should return true for valid id', function() {
        expect(isAdult('12345620020219003X')).to.equal(true);
    });

    it('should return false for invalid id', function() {
        expect(isAdult('abcdefg')).to.equal(false);
    });

    it('should return false for invalid id', function() {
        expect(isAdult(1345)).to.equal(false);
    });

    it('should return false for invalid id', function() {
        expect(isAdult('12345619800101')).to.equal(false);
    });

    it('should return false for invalid id', function() {
        expect(isAdult('1234561980010100x0')).to.equal(false);
    });
});